﻿<UserControl xmlns:my="clr-namespace:GMap.NET.WindowsPresentation;assembly=GMap.NET.WindowsPresentation"
             x:Class="Gui.Controls.Map"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:vm="clr-namespace:Gui.ViewModels"
	             mc:Ignorable="d"
	             d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.DataContext>
        <vm:MapViewModel />
    </UserControl.DataContext>

    <Grid>
        <!-- 
        
        Position="{Binding Position}" 
        ItemsSource="{Binding Markers}"
        -->
        <my:GMapControl Name="GMapControl" DataContext="{Binding SelectedItem,ElementName=GMapControl}" Margin="0,0,0,0" 
                         AllowDrop="True"
                         MinZoom="1"
                         MaxZoom="23"
                         CanDragMap="True">
            <my:GMapControl.ItemsPanel>
        <ItemsPanelTemplate>

                    <Canvas IsManipulationEnabled="True" />

                </ItemsPanelTemplate>

            </my:GMapControl.ItemsPanel>
        </my:GMapControl>
       
    </Grid>

</UserControl>